<template>
	<view class="mall-cart-bar">
		<view class="sel">
			<text v-if="!allSel" @click="selAll" class="iconfont iconweixuanzhong"></text>
			<text v-if="allSel" @click="selAll" class="iconfont iconxuanzhong"></text>
			<text class="txt">全选</text>
		</view>
		<view class="info">
			<text class="txt">已经优惠</text>
			<text class="price">{{priceInfo.cut}}</text>
			<text class="txt">元</text>
		</view>
		<view class="prices">
			<text class="txt">合计:</text>
			<text class="price">¥ {{priceInfo.total}}</text>
		</view>
		<view class="btn" @click="confirm">
			去结算
		</view>
	</view>
</template>

<script>
	
	export default {
		methods:{
			selAll(){
				this.$emit("selAll")
			},
			confirm(){
				this.$emit("confirm")
			}
		},
		props:{
			allSel:Boolean,
			priceInfo:Object
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="stylus">
	.mall-cart-bar
		height 88upx
		padding 0 21upx
		display flex
		background-color white
		align-items center
		position fixed
		bottom 0
		left 0
		right 0
		.sel
			margin-left 15upx
			display flex
			align-items center
			flex 1
			.iconfont
				color #B1B1B1
				font-size 32upx
			.txt
				color #A1A1A1
				font-size 22upx
				margin-left 10upx
		.info
			display flex
			align-items center
			margin-left 11upx
			margin-right 19upx
			.txt
				color #A1A1A1
				font-size 18upx
			.price
				color #F7895E
				font-size 24upx
		.prices
			display flex
			align-items center
			font-size 24upx
			.txt
				color #4E3D07
			.price
				margin-left 10upx
				color #F7895E
		.btn
			color white
			width:150upx;
			height:60upx;
			background:rgba(247,137,94,1);
			border-radius:30upx;
			display flex
			align-items center
			justify-content center
			font-size 24upx
			margin-left 19upx
</style>
